package com.xuecheng.api.media;

import com.xuecheng.api.media.model.VodUploadRequest;
import com.xuecheng.api.media.model.VodUploadToken;
import com.xuecheng.api.media.model.dto.MediaDTO;
import com.xuecheng.api.media.model.qo.QueryLiveCourseModel;
import com.xuecheng.api.media.model.qo.QueryMediaModel;
import com.xuecheng.api.media.model.vo.MediaVO;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import com.xuecheng.common.domain.response.RestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 * 媒资管理 Api 接口
 * </p>
 *
 * @Description:
 */
@Api(value = "媒资管理 Api 接口", tags = "媒资-媒资管理业务服务 Api 接口", description = "媒资管理业务服务 Api 接口")
public interface MediaApi {

    @ApiOperation("创建媒资上传凭证")
    @ApiImplicitParam(name = "vodUploadRequest", value = "媒资上传请求信息",
            required = true, dataType = "VodUploadRequest", paramType = "body")
    VodUploadToken createVODUploadToken(VodUploadRequest vodUploadRequest);

    @ApiOperation("刷新视频上传凭证，为前端分片上传使用")
    VodUploadToken refreshVODUploadToken(String videoId);


    PageVO queryMediaList(PageRequestParams params, QueryMediaModel model);


    @ApiOperation("微服务调用 根据mediaId 查询媒资信息")
    @ApiImplicitParam(name = "mediaId",
            value = "媒资ID", required = true,
            dataType = "long", paramType = "path", example = "1")
    RestResponse getByMediaId(Long mediaId);


    @ApiOperation("添加媒资信息")
    @ApiImplicitParam(name = "mediaVO", value = "媒资Vo类", required = true, dataType = "MediaVO", paramType = "body")
    MediaDTO createMedia(MediaVO mediaVO);

    @ApiOperation("获得媒资信息预览资源地址")
    @ApiImplicitParam(name = "mediaId", value = "媒资id值", required = true, dataType =
            "Long", paramType = "path")
    String previewMedia(Long mediaId);

    @ApiOperation("删除媒资信息")
    @ApiImplicitParam(name = "mediaId", value = "媒资id值", required = true, dataType =
            "Long", paramType = "path")
    boolean deleteMedia(Long mediaId);



}